<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="#">商品统计</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('counts/index')}">
        商品ID:
        <input type="text" class="form-control" name="goods_id" style="width: 120px;" value="{:input('request.goods_id/s','')}" placeholder="商品ID">
        商品名称:
        <input type="text" class="form-control" name="goods_name" style="width: 120px;" value="{:input('request.goods_name/s','')}" placeholder="商品名称">
        时间:
        <input type="text" class="form-control js-bootstrap-date" name="start_time" id="start_time" value="{:input('request.start_time')}" style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-date" name="end_time" id="end_time" value="{:input('request.end_time')}" style="width: 140px;" autocomplete="off">
        排序:
        <select class="form-control" name="order_by" style="width: 140px;">
            <if condition="$order_by eq 0">
                <option selected value='0'>未选择</option>
                <else/>
                <option value='0'>未选择</option>
            </if>
            <if condition="$order_by eq 1">
                <option selected value='1'>从大到小</option>
            <else/>
                <option value='1'>从大到小</option>
            </if>
            <if condition="$order_by eq 2">
                <option selected value='2'>从小到大</option>
            <else/>
                <option value='2'>从小到大</option>
            </if>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('counts/index')}">清空</a>
    </form>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th >序列号</th>
            <th>商品ID</th>
            <th>商品名字</th>
            <th>商品价格</th>
            <th>会员价格</th>
            <th>是否套餐</th>
            <th>销售数量</th>
            <th>销售金额</th>
            <th>支付时间</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="data" item="data" key="k">
            <tr>
                <td>{$k+1}</td>
                <td>{$data['goods_id']}</td>
                <td>{$data['goods_name']}</td>
                <td>{$data['price']}</td>
                <td>{$data['money']}</td>
                <td>{$data['stemeal_name']}</td>
                <td>{$data['number']}</td>
                <td>{$data['total_money']}</td>
                <td>{$data['w_time']|date="Y-m-d H:i:s",###}</td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>